// 登录接口需要携带的参数的类型
export interface loginForm {
    email: string;
    password: string;
    loginWay: "password" | "code";
}

// 登录接口返回的数据结构
export type loginResponse = {
    token: string;
};
export type loginResponseData = ResponseData<loginResponse>;

// 获取用户信息接口返回的数据结构
export type userInfoResponse = {
    id: number;
    name: string;
    email: string;
    avatar: string;
    intro: string;
};
export type userInfoResponseData = ResponseData<userInfoResponse>;

// 注册接口需要携带的参数的类型
export interface registerForm {
    name: string;
    email: string;
    password: string;
    confirmPassword: string;
    code: string;
}

// 注册接口返回的数据结构
export type registerResponseData = ResponseData<string>;

// 修改密码的参数
export interface EditPasswordForm {
    oldPassword: string;
    newPassword: string;
    newPasswordAgain: string;
}
// 修改个人信息的参数
export interface EditInfoData {
    user_name: string;
    avatar_url: string;
    intro: string;
}

// 修改邮箱的参数
export interface EditEmailForm {
    email: string;
    code: string;
}
